Methods, systems and apparatus for predicting the way of a set associative cache

ABSTRACT

A method for predicting a way of a set associative shadow cache is disclosed. As a part of a method, a request to fetch a first far taken branch instruction of a first cache line from an instruction cache is received, and responsive to a hit in the instruction cache, a predicted way is selected from a way array using a way that corresponds to the hit in the instruction cache. A second cache line is selected from a shadow cache using the predicted way and the first cache line and the second cache line are forwarded in the same clock cycle.

RELATED APPLICATIONS

This Application claims priority to U.S. Provisional Patent Application Ser. No. 61/793,703, filed on Mar. 15, 2013, entitled “Method and Apparatus for Predicting the Way of Set Associative Shadow Cache” which is hereby incorporated herein by reference in its entirety.

The following copending International Application No. PCT/US2011/051992 is incorporated herein by reference in its entirety for all purposes: “Single Cycle Multi-Branch Prediction Including Shadow Cache for Early Far Branch Prediction,” Attorney Docket SMII-020.WO, Mohammad Abdallah, filed on Sep. 16, 2011.

BACKGROUND

A processor, also referred to as a central processor unit (CPU), is the hardware within a computer that carries out the instructions of a computer program by performing the basic arithmetical, logical, and input/output operations of the system. Conventional processors can have a variety of architecture features that can include but are not limited to wide architectures and pipelined architectures.

Processors that have wide architectures are capable of fetching and decoding multiple cache lines of instructions in parallel. In order to optimally support such wide architectures the processor frontend must be capable of supplying multiple cache lines of instructions to the processor scheduler and execution units during each clock cycle.

In addition, processors can encounter a variety of branch instruction types that can present challenges as regards supplying multiple cache-lines of instructions to the processors' scheduler and execution units during each cycle (because of complex program control flows). Such instructions can include what are termed “far branch” instructions and “near branch” instructions (e.g., loop instructions). Far branch instructions are instructions that can alter the flow of instruction execution in a program wherein instruction execution jumps outside of a cache line. Loop instructions are instructions that include a sequence of statements that are specified only once but that are carried out several times in succession before the loop is exited (and can involve jumps within a cache line).

In pipelined architectures multiple sequential instructions are executed simultaneously. However, the pipeline can only be fully utilized if the processor is able to read a next instruction from memory on every cycle. Importantly, the processor must know which instruction is to be next read in order to read that instruction. However, when a far branch instruction is encountered, the processor may not know ahead of time the path that will be taken and thus which instruction is to be next read. In such instances, the processor has to stall until this issue can be resolved. This process can degrade utilization and negatively impact processor performance especially where high-performance processors are concerned and the supply of high throughput from the front end of the device is important.

SUMMARY

In some conventional processors when a conditional branch instruction is encountered, it may not be known ahead of time which path will be taken and thus which instruction is to be read. In such instances, the processor has to stall until the decision is resolved. This can degrade utilization and negatively impact processor performance especially in the case of high-performance processors where high throughput from the front end of the device is required. Methods for predicting a way of a set associative shadow cache is disclosed that addresses these shortcomings. However, the claimed embodiments are not limited to implementations that address any or all of the aforementioned shortcomings. As a part of a method, a request to fetch a first far taken branch instruction of a first cache line from an instruction cache is received, and responsive to a hit in the instruction cache, a predicted way is selected from a way array using a way that corresponds to the hit in the instruction cache. A second cache line that is copied from the target address of the first far taken branch instruction is selected from the shadow cache using the predicted way. The predicted way helps to facilitate the fetching and forwarding of the first cache line and the second cache line in a single clock cycle (by specifying the location of the second cache line in a shadow cache that is provided at the same cache hierarchical level as the instruction cache). This forwarding of multiple cache lines provides the high throughput that high-performance processors require from their front ends.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention, together with further advantages thereof, may best be understood by reference to the following description taken in conjunction with the accompanying drawings in which:

FIG. 1A shows an exemplary operating environment of a system for predicting the way of a set associative shadow cache according to one embodiment.

FIG. 1B shows an instruction cache and a shadow cache that stores a copy of a cache line that is copied from a target of a first far taken branch instruction according to one embodiment.

FIG. 1C illustrates the forwarding together of two cache lines based on the operation of a system for predicting a way of a set associative shadow cache according to one embodiment.

FIG. 1D illustrates operations performed by system for predicting a way of a set associative shadow cache according to one embodiment according to one embodiment.

FIG. 1E illustrates operations performed by system for predicting a way of a set associative shadow cache according to one embodiment according to one embodiment.

FIG. 1F illustrates validation operations performed by system for predicting a way of a set associative shadow cache according to one embodiment according to one embodiment.

FIG. 2 shows components of a system for predicting a way of a set associative shadow cache according to one embodiment.

FIG. 3A shows a flowchart of the steps performed in an exemplary method for predicting a way of a set associative shadow cache according to one embodiment.

FIG. 3B shows a flowchart of the steps performed in an exemplary method for predicting a way of a set associative shadow cache according to one embodiment.

It should be noted that like reference numbers refer to like elements in the figures.

DETAILED DESCRIPTION

Although the present invention has been described in connection with one embodiment, the invention is not intended to be limited to the specific forms set forth herein. On the contrary, it is intended to cover such alternatives, modifications, and equivalents as can be reasonably included within the scope of the invention as defined by the appended claims.

In the following detailed description, numerous specific details such as specific method orders, structures, elements, and connections have been set forth. It is to be understood however that these and other specific details need not be utilized to practice embodiments of the present invention. In other circumstances, well-known structures, elements, or connections have been omitted, or have not been described in particular detail in order to avoid unnecessarily obscuring this description.

References within the specification to “one embodiment” or “an embodiment” are intended to indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. The appearance of the phrase “in one embodiment” in various places within the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Moreover, various features are described which may be exhibited by some embodiments and not by others. Similarly, various requirements are described which may be requirements for some embodiments but not other embodiments.

Some portions of the detailed descriptions, which follow, are presented in terms of procedures, steps, logic blocks, processing, and other symbolic representations of operations on data bits within a computer memory. These descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. A procedure, computer executed step, logic block, process, etc., is here, and generally, conceived to be a self-consistent sequence of steps or instructions leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals of a computer readable storage medium and are capable of being stored, transferred, combined, compared, and otherwise manipulated in a computer system. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.

It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present invention, discussions utilizing terms such as “receiving” or “reading” or “comparing” or “selecting” or the like, refer to the action and processes of a computer system, or similar electronic computing device that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories and other computer readable media into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.

Exemplary Operating Environment of Systems and Apparatus for Predicting the Way of a Set Associative Cache According to One Embodiment

FIG. 1A shows an exemplary operating environment 100 of a system 101 for predicting the way of a set associative shadow cache according to one embodiment. System 101, upon receipt of a request to fetch a first far taken branch instruction of a first cache line, determines a predicted way of a shadow cache where a second cache line that is copied from the branch instruction target address is stored and selects the second cache line from the shadow cache using the predicted way. The predicted way helps to facilitate the fetching and forwarding of the first cache line and the second cache line in a single clock cycle (by specifying the location of the second cache line in a shadow cache that is provided at the same cache hierarchical level as the instruction cache). Moreover, the forwarding of multiple cache lines in a single clock cycle provides the high level of throughput that high-performance processors require from their front ends. FIG. 1A shows system 101, level one (L1) cache 103, instruction cache 103 a, instruction cache tag store 103 b, information cache 103 c, shadow cache 103 d, shadow cache tag store 103 e, way predictor 103F, cache controller 105, CPU 107, level two (L2) cache 109, system interface 111 and main memory 113.

Referring to FIG. 1A, level one (L1) cache 103 is the primary cache of CPU 107 and is static memory which can be integrated with the processor core. Moreover, L1 cache 103 is used to store information that has been recently accessed by CPU 107. In one embodiment, L1 cache 103 can include instruction cache 103 a, instruction cache tag store 103 b, information cache 103 c, shadow cache 103 d, shadow cache tag store 103 e and way predictor 103 f. In one embodiment, instruction cache tag store 103 b stores tags for each of the cache lines that are stored in the instruction cache 103 a. Instruction cache information store 103 c stores the target addresses of first far taken branch instructions. Shadow cache 103 d stores copies of cache lines that are stored at the target addresses of first far taken branches. Shadow cache tag store 103 e stores a tag for each of the cache lines that are stored in shadow cache 103 d. Way predictor 103 f stores the way of a set of shadow cache 103 d where cache lines from the target of first far taken branches are copied. In one embodiment, shadow cache 103 d can have the same number of sets and half the number of ways as does the instruction cache 103 a. In other embodiments, other configurations of shadow cache 103 d with different numbers of sets and ways can be used.

Referring again to FIG. 1A, cache controller 105 includes the logic used to control cache memory units and to carry out predetermined cache policies. In one embodiment, system 101 and its functionality can be provided as a part of cache controller 105. In other embodiments, system 101, or components thereof, can be separate from cache controller 105. System 101 is described in detail herein below.

Level 2 cache 109 is secondary cache but like L1 cache 103 is used to store recently accessed information. In one embodiment, a cache-line that is stored in L2 cache 109 can be brought from L2 cache 109 and placed into L1 cache 103. When the cache line is brought from L2 cache 109, data can be decoded from the cache line and placed into information cache 103 c.

Main memory 113 includes physical addresses that store information that can be copied into cache memory. Also shown in FIG. 1A is system interface 111. System interface 111 facilitates the transfer of data between main memory 113 and L2 cache 109.

Referring to FIG. 1A, system 101 enables the forwarding of multiple cache lines of instructions to the processor scheduler and execution units (not shown) during each cycle. In one embodiment, system 101 accesses requests to fetch a far taken branch instruction of a first cache line from an instruction cache, and responsive to a hit in the instruction cache, determines the way of a shadow cache that is accessed for a second cache line that is copied from the target address of the first far taken branch and stored in shadow cache 103 d (such that both the first cache line and the second cache line can be fetched in a single clock cycle). In one embodiment, a predicted way that is stored in way predictor 103 f determines the way of shadow cache 103 d that is accessed for the second cache line. In another embodiment, a tag in shadow cache tag cache 103 e determines the way of shadow cache 103 d that is accessed for the second cache line. Exemplary details related to the determination of the way of shadow cache 103 d that is accessed for the second cache line are described below in the operation section.

In an exemplary embodiment, when a first cache line that contains a first far taken branch is fetched from instruction cache 103 a, a second cache line at the cached target address is fetched from shadow cache 103 d in the same clock cycle (as opposed to the cache line that follows the first cache line as part of a consecutive code fetch) as is shown in FIG. 1B. In one embodiment, these two cache line can then be forwarded together as shown in FIG. 1C (e.g., to processor scheduler and execution units).

Operation

FIGS. 1D-1F illustrates operations performed by system 101 for predicting a way of a set associative shadow cache according to one embodiment according to one embodiment. These operations, which relate to predicting a way of a set associative shadow cache are only exemplary. It should be appreciated that other operations not illustrated by FIGS. 1D-1F can be performed in accordance with one embodiment.

High-performance processors require the front-end of the machine to supply a high-throughput. In the embodiment illustrated in FIG. 1D, high-throughput is supplied by reading more than one cache line in the same clock cycle for forwarding purposes. In one embodiment, in order to accomplish this, a cache line stored at the target of a predicted-first-far-taken-branch instruction of a first cache line in the instruction cache 103 a is copied into shadow cache 103 d. The shadow cache ways are fetched in parallel to the instruction cache line being fetched. To supply the two cache lines in the same cycle requires predicting the target of a first far taken branch where the target is in a different cache-line (far branch). This predicted target is compared with the tags of shadow cache 103 d. The comparison generates a way select that is used to read the copy of the cache line of instructions that is stored at the target address out of shadow cache 103 d.

Information cache 103 c stores the target address of the predicted first-far-taken-branch. In one embodiment, when a cache line is fetched, and it is predicted to have a far-branch, the target of this branch is read out of information cache 103 c and compared to the tags at that set in shadow cache 103 d. The ‘way’ that has the hit is then used to select the data out of the shadow cache data array. These operations are illustrated in FIG. 1D.

Exemplary Embodiment

Referring to FIG. 1D, at A, system 101, in response to a request to fetch a first far taken branch instruction of a first cache line from an instruction cache, an instruction cache (e.g., 103 a in FIG. 1A) along with other cache components are read at a first time T0. As shown in FIG. 1D, the additional cache components that are read at time T0 include but are not limited to instruction cache tag storage 103 b, information cache 103 c, shadow cache tag storage 103 e and way predictor 103 f.

At B, responsive to a hit in said instruction cache, at time T1, a way corresponding to the hit is used to select a target address that is stored in information cache 103 c. In particular, in one embodiment, a tag address 122 that is read from flip-flop 120 is compared to the tags at the indicated set in instruction cache tag store 103 b to determine the way that corresponds to the hit in the instruction cache (e.g., 103 a in FIG. 1A). The way of instruction cache tag store 103 b that has the hit is used as an input to a selection component 124 (e.g., a multiplexor) that causes a selection of a target address from the corresponding way of information cache 103 c.

At C, the target address is compared to tags at the indicated set in shadow cache tag store 103 e to determine the way that has the hit.

At D, the way that has the hit in shadow cache tag store 103 e is used as an input to data selection component 128 that selects data from shadow cache 103 d such as a second cache line that is copied from the target address of the first far taken branch and stored in shadow cache 103 d. In one embodiment, the first cache line and the second cache line can then be forwarded together such as to processor scheduler and execution units (not shown). In one embodiment, the first cache line and the second cache line can be forwarded together to processor scheduler and execution units in the same clock cycle.

Exemplary Embodiment

FIG. 1E illustrates the use of a way predictor 103 f for way prediction in accordance with one embodiment. In one embodiment, way predictor 103 f stores predicted ways per way of instruction cache 103 a. In one embodiment, a small array can be used to implement way predictor 103 f. When a hit in instruction cache 103 a is determined, the way of instruction cache 101 a where the hit occurs is used to select the predicted way from way predictor 103 f. The predicted way is then used to directly select the data (e.g., a cache line) that is stored at that way of shadow cache 103 d. This reduces the critical path significantly. In one embodiment, predicted-way select multiplexor 130 that is used in the FIG. 1E embodiment, can be smaller in size than branch target multiplexor 124 that is used in the FIG. 1D embodiment. In one embodiment, the comparison with the shadow-tag can be eliminated from the critical path.

Referring to FIG. 1E, at A, system 101A, in response to a request to fetch a first far taken branch instruction of a first cache line from an instruction cache, an instruction cache (e.g., 103 a in FIG. 1A) is read at a first time T0. As shown in FIG. 1E, cache components that are simultaneously read include but are not limited to instruction cache tag store 103 b, way predictor 103 f and shadow cache 103 d.

At B, responsive to a hit in said instruction cache, a way corresponding to the hit is used to select a predicted way that is stored in way predictor 103 f (a cache array). In one embodiment, a tag address 121 that is read from flip-flop 120 is compared by comparer 122 to the tags at the indicated set in instruction cache tag store 103 b. The way of instruction cache tag store 103 b that has the hit is used to select a predicted shadow cache way from way predictor 103 f.

At C, the predicted way 131 is used as an input to selection component 128 which selects data from shadow cache 103 d (data such as a second cache line that is copied from the target address of the first far taken branch instruction and stored in shadow cache 103 d). In one embodiment, the first and the second cache lines can then be forwarded together such as to processor scheduler and execution units (not shown). In one embodiment, the first and the second cache lines can be forwarded together to processor scheduler and execution units in the same clock cycle.

Validation

FIG. 1F illustrates the validation of a predicted target that is stored in way predictor 103 f. The validation is made by comparing the output of way predictor 103 f (the predicted target) with the output of shadow tag comparer 126 (which identifies the actual way that stores the target address in the shadow cache). In one embodiment, the predicted way can be maintained in multiple ways. For example, in one embodiment, the result of the aforementioned comparison can used to determine the predicted way, e.g., a determined miss is used to control the updating of the way.

Referring to FIG. 1F, at A, system 101, in response to a request to fetch a first far taken branch instruction of a first cache line from an instruction cache, an instruction cache (e.g., 103 a in FIG. 1A) along with other cache components are read at a first time T0. As shown in FIG. 1D, the additional cache components that are read at time T0 include but are not limited to instruction cache tag storage 103 b, information cache 103 c, shadow cache tag storage 103 e and way predictor 103 f.

At B, responsive to a hit in said instruction cache, at time T1, a way corresponding to the hit is used to select a target address that is stored in information cache 103 c. In particular, in one embodiment, a tag address 122 that is read from flip-flop 120 is compared to the tags at the indicated set in instruction cache tag store 103 b to determine the way that corresponds to the hit in the instruction cache (e.g., 103 a in FIG. 1A). The way of instruction cache tag store 103 b that has the hit is used as an input to a selection component 124 (e.g., a multiplexor) that causes a selection of a target address from the corresponding way of information cache 103 c.

At C, the target address is compared to tags at the indicated set in shadow cache tag store 103 e to determine the way that has the hit.

At D, the way that has the hit in shadow cache tag storage 103 e is compared with the way that is stored in way predictor 103 f.

Components of System for Predicting the Way of a Set Associative Cache According to One Embodiment

FIG. 2 shows components of a system 101 for predicting a way of a set associative shadow cache according to one embodiment. In one embodiment, components of system 101 implement an algorithm for predicting a way of a set associative shadow cache. In the FIG. 2 embodiment, components of system 101 include cache reader 201, way selector 203, data selector 205 and way comparer 207.

Cache reader 201 reads cache components in response to a request to fetch a first far taken branch instruction of a first cache line from an instruction cache. In one embodiment, cache reader 201 can read cache components that include but are not limited to an instruction cache tag store, a way predictor and a shadow cache.

Way selector 203 selects a way that is used to select data from a shadow cache. In one embodiment, way selector 203 can be implemented using an array that stores predicted ways that can be selected from the array and a multiplexor that receives a way input that is provided based on a hit that is made in an instruction cache tag store (see FIG. 1A). In another embodiment, way selector can be implemented using an information cache (e.g., 103 c in FIG. 1A) and a shadow cache tag store (e.g., 103 e in FIG. 1A) where a target address from information cache (e.g., 103 c in FIG. 1A) is used to determine a way hit in a shadow cache tag store (e.g., 103 e in FIG. 1A) that provides the way of the shadow cache (e.g., 103 d in FIG. 1A) from which to select data (e.g., a cache line).

Data selector 205 uses the way that is provided by way selector 203 to select data from a shadow cache such as a second cache line that has been copied from the target address of the first far taken branch instruction and stored in the shadow cache (e.g., 103 d in FIG. 1A). In one embodiment, the first and second cache lines can then be forwarded together such as to processor scheduler and execution units (not shown). In one embodiment, the first and second cache lines can be forwarded in the same clock cycle. In one embodiment, data selector 205 can be implemented using a multiplexor.

Way selection validator 207 compares the way that is indicated by a shadow cache tag store (e.g., 103 e in FIG. 1A) and the predicted way provided by way predictor (e.g., 103 f in FIG. 1A).

It should be appreciated that the aforementioned components of system 101 can be implemented in hardware, software, firmware or in some combination thereof. In one embodiment, components and operations of system 101 can be encompassed by components and operations of one or more computer components or programs (e.g., a cache controller 105). In another embodiment, components and operations of system 101 can be separate from the aforementioned one or more computer components or programs but can operate cooperatively with components and operations thereof.

Method for Predicting the Way of a Set Associative Cache According to One Embodiment According to One Embodiment

FIGS. 3A and 3B show flowchart 300A and 300B of the steps performed in an exemplary method for predicting a way of a set associative shadow cache according to one embodiment. The flowcharts include processes that, in one embodiment can be carried out by processors and electrical components under the control of computer-readable and computer-executable instructions. Although specific steps are disclosed in the flowcharts, such steps are exemplary. That is the present embodiment is well suited to performing various other steps or variations of the steps recited in the flowcharts.

Referring to FIG. 3A, at 301A, responsive to a request to fetch a first far taken branch instruction of a first cache line, an instruction cache tag store (e.g., 103 b in FIG. 1A), an information cache (e.g., 103 c in FIG. 1A), a shadow cache (e.g., 103 d in FIG. 1A) and a shadow cache tag store (e.g., 103 e in FIG. 1A) are read.

At 303A, responsive to a hit in the instruction cache, a way corresponding to the hit (as indicated by the instruction cache tag store 103 b in FIG. 1A) is used to select a target address that is stored in the information cache (e.g., 103 c in FIG. 1A).

At 305A, the target address is compared to tags at the indicated set in the shadow cache tag store (e.g., 103 e in FIG. 1A) to determine a way of the shadow cache (e.g., 103 d) that has the hit.

At 307A, the way that has the hit in shadow cache tag store (e.g., 103 e in FIG. 1A) is used to select data from the shadow cache (e.g., 103 d in FIG. 1A). In one embodiment, the data is a second cache line that has been copied from the target address of the first far taken branch instruction and stored in the shadow cache (e.g., 103 d in FIG. 1A). In one embodiment, the first and second cache lines can then be forwarded together, in the same clock cycle, to the processor scheduler and execution units (not shown).

Referring to FIG. 3B, at 301B a request is received to fetch a first far taken branch instruction of a first cache line from an instruction cache (e.g., 103 c in FIG. 1A).

At 303B, responsive to a determination of a hit in the instruction cache, a way corresponding to the hit is used to select a predicted way that is stored in a way predictor (e.g., 103 f in FIG. 1A).

At 305B, the predicted way is used to select data from a shadow cache (e.g., 103 d in FIG. 1A). In one embodiment, the data is a second cache line that has been copied from the target address of the first far taken branch instruction and stored in the shadow cache (e.g., 103 d in FIG. 1A). In one embodiment, the first and second cache lines can then be forwarded together such as to the processor scheduler and execution units (not shown).

At 307B the predicted way that is provided by the way predictor (e.g., 103 f in FIG. 1A) is compared with the way that is indicated by a shadow cache tag store (e.g., 103 e in FIG. 1A) to determine if the predicted way is valid.

With regard to exemplary embodiments thereof, a method for predicting a way of a set associative shadow cache is disclosed. As part of a method, a request to fetch a first far taken branch instruction of a first cache line from an instruction cache is received, and responsive to a hit in the instruction cache, a predicted way is selected from a way array using a way that corresponds to the hit in the instruction cache. A second cache line is selected from the shadow cache using the predicted way and the first cache line and the second cache line are forwarded in the same clock cycle.

Although many of the components and processes are described above in the singular for convenience, it will be appreciated by one of skill in the art that multiple components and repeated processes can also be used to practice the techniques of the present invention. Further, while the invention has been particularly shown and described with reference to specific embodiments thereof, it will be understood by those skilled in the art that changes in the form and details of the disclosed embodiments may be made without departing from the spirit or scope of the invention. For example, embodiments of the present invention may be employed with a variety of components and should not be restricted to the ones mentioned above. It is therefore intended that the invention be interpreted to include all variations and equivalents that fall within the true spirit and scope of the present invention. 

We claim:
 1. A method for predicting a way of a set associative shadow cache, comprising: receiving a request to fetch a first far taken branch instruction of a first cache line from an instruction cache; responsive to a hit in said instruction cache, selecting a predicted way from a way array using a way that corresponds to said hit; and selecting a second cache line that is stored at the target of said first far taken branch instruction from a shadow cache using said predicted way and forwarding said first cache line and said second cache line in the same clock cycle.
 2. The method of claim 1 further comprising: in response to said receiving a request, reading a plurality of components of an L1 cache.
 3. The method of claim 1 wherein a determination of said hit is based on an instruction cache tag.
 4. The method of claim 1 wherein said predicted way comprises a predetermined number of bits.
 5. The method of claim 1 wherein said predicted way is stored in said array per way of said instruction cache.
 6. The method of claim 1 further comprising: comparing said predicted way with a way indicated by a shadow cache tag storage component.
 7. The method of claim 6 wherein said comparing is used to update said predicted way if said predicted way is incorrect.
 8. A processor, comprising: a CPU; and a cache system, comprising: a cache controller, wherein said cache controller comprises: a request receiver for receiving a request to fetch a first far taken branch instruction of a first cache line from an instruction cache; a predicted way selector for, responsive to a hit in said instruction cache, selecting a predicted way from a way array using a way that corresponds to said hit; and a data selector for selecting a second cache line that is stored at the target of the first far taken branch instruction from a shadow cache using said predicted way and forwarding said first cache line and said second cache line in the same clock cycle.
 9. The processor of claim 8 further comprising: a reader for, in response to said receiving a request, reading a plurality of components of an instruction cache.
 10. The processor of claim 8 wherein a determination of said hit is based on an instruction cache tag.
 11. The processor of claim 8 wherein said predicted way comprises a predetermined number of bits.
 12. The processor of claim 8 wherein said predicted way is stored in said array per way of said instruction cache.
 13. The processor of claim 8 further comprising: a comparer for comparing said predicted way with a way indicated by a shadow cache tag storage component.
 14. The processor of claim 13 wherein said comparing is used to update said predicted way if said predicted way is incorrect.
 15. A cache controller, comprising: a request receiver for receiving a request to fetch a first far taken branch instruction of a first cache line from an instruction cache; a predicted way selector for, responsive to a hit in said instruction cache, selecting a predicted way from a way array using a way that corresponds to said hit; and a data selector for selecting a second cache line that is stored at the target of the first far taken branch instruction from a shadow cache using said predicted way and forwarding said first cache line and said second cache line in the same clock cycle.
 16. The cache controller of claim 15 further comprising: a reader for, in response to said receiving a request, reading a plurality of components of an instruction cache. 15
 17. The cache controller of claim 15 wherein a determination of said hit is based on an instruction cache tag.
 18. The cache controller of claim 15 wherein said predicted way comprises a predetermined number of bits.
 19. The cache controller of claim 15 wherein said predicted way is stored in said array per way of said instruction cache.
 20. The cache controller of claim 15 further comprising: a comparer for comparing said predicted way with a way indicated by a shadow cache tag storage component. 